TypeScript v5.5
そのおかげでfilterで型推論がちゃんと効くようになった
code:ts
// birds: Bird[]
const birds = countries
.map(country => nationalBirds.get(country))
.filter(bird => bird !== undefined);
Control Flow Narrowing for Constant Indexed Accesses
obj[key]に対する型の絞り込みが効く
code:ts
function f1(obj: Record<string, unknown>, key: string) {
if (typeof objkey === "string") { // Now okay, previously was error
}
}
The JSDoc @import Tag
docs内で外部ファイルの型を参照する時に使う
Regular Expression Syntax Checking ref すごmrsekut.icon
Support for New ECMAScript Set Methods
WIP
Isolated Declarations
Consulting package.json Dependencies for Declaration File Generation
Editor and Watch-Mode Reliability Improvements
Performance and Size Optimizations
Easier API Consumption from ECMAScript Modules
The transpileDeclaration API
Notable Behavioral Changes
Disabling Features Deprecated in TypeScript 5.0
lib.d.ts Changes
Stricter Parsing for Decorators
undefined is No Longer a Definable Type Name
Simplified Reference Directive Declaration Emit
TypeScript 5.5 で tsconfig.json>module よりも package.json>type と拡張子を優先するようになったので、dualパッケージ生成ロジックが壊れた /
これどの話だ